package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.XMainMapper;
import com.ruoyi.system.domain.XMain;
import com.ruoyi.system.service.IXMainService;

/**
 * 销售Service业务层处理
 * 
 * @author GGJ
 * @date 2024-05-13
 */
@Service
public class XMainServiceImpl implements IXMainService 
{
    @Autowired
    private XMainMapper xMainMapper;

    /**
     * 查询销售
     * 
     * @param id 销售主键
     * @return 销售
     */
    @Override
    public XMain selectXMainById(Long id)
    {
        return xMainMapper.selectXMainById(id);
    }

    /**
     * 查询销售列表
     * 
     * @param xMain 销售
     * @return 销售
     */
    @Override
    public List<XMain> selectXMainList(XMain xMain)
    {
        return xMainMapper.selectXMainList(xMain);
    }

    /**
     * 新增销售
     * 
     * @param xMain 销售
     * @return 结果
     */
    @Override
    public int insertXMain(XMain xMain)
    {
        return xMainMapper.insertXMain(xMain);
    }

    /**
     * 修改销售
     * 
     * @param xMain 销售
     * @return 结果
     */
    @Override
    public int updateXMain(XMain xMain)
    {
        return xMainMapper.updateXMain(xMain);
    }

    /**
     * 批量删除销售
     * 
     * @param ids 需要删除的销售主键
     * @return 结果
     */
    @Override
    public int deleteXMainByIds(Long[] ids)
    {
        return xMainMapper.deleteXMainByIds(ids);
    }

    /**
     * 删除销售信息
     * 
     * @param id 销售主键
     * @return 结果
     */
    @Override
    public int deleteXMainById(Long id)
    {
        return xMainMapper.deleteXMainById(id);
    }
}
